<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Miscellany Template</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
MathJax = {
	tex: {
		inlineMath: '$', '$'], ['\\(', '\\)'
	},
	svg: {
		fontCache: 'global'
	}
};
</script>
<script type="text/javascript" id="MathJax-script" async
	src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
</script>

<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Miscellany Template' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../extensions.html">Kits</a></li><li><a href="index.html">WorldModelKit</a></li><li><b>Miscellany Template</b></li></ul></div>
<ul class="toc"><li><a href="mstm.html#SP1">&#167;1. Identification</a></li><li><a href="mstm.html#SP2">&#167;2. Global Variables</a></li><li><a href="mstm.html#SP3">&#167;3. Compass</a></li><li><a href="mstm.html#SP4">&#167;4. Score and Rankings Table</a></li><li><a href="mstm.html#SP5">&#167;5. Other odds and ends</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. Identification.</b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">WORLDMODELKIT</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">USE_SCORING</span><span class="plain-syntax"> = </span><span class="identifier-syntax">WorldModelKit</span><span class="plain-syntax">`</span><span class="identifier-syntax">SCORING_CFGV</span><span class="plain-syntax">;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. Global Variables.</b>These are not the only global variables defined in the template layer:
those needed locally only by single sections (and not used in definitions
of phrases in the Standard Rules, or referred to by Inform directly) are defined
within those sections &mdash; they can be regarded as unimportant implementation
details, subject to change at whim. The variables here, on the other hand,
are more important to understand.
</p>

<ul class="items"><li>(1) The first three variables to be defined are special in that they are
significant to very early-style Z-machine interpreters, where they are
used to produce the status line display (hence <span class="extract"><span class="extract-syntax">sline1</span></span> and <span class="extract"><span class="extract-syntax">sline2</span></span>).
</li><li>(2) The <span class="extract"><span class="extract-syntax">say__*</span></span> are used for the finite state machine used in printing
text, which keeps track of automatic paragraph breaking and the like. For
details see the "Printing.i6t" section.
</li><li>(3) <span class="extract"><span class="extract-syntax">standard_interpreter</span></span> is used only for the Z-machine VM, and is always
0 for Glulx. For Z, a non-zero value here is the version number of the
{\it Z-Machine Standards Document} which the interpreter claims to support,
in the form (upper byte).(lower). <span class="extract"><span class="extract-syntax">undo_flag</span></span>, similarly, behaves slightly
differently on the two platforms according to whether they support multiple
consecutive UNDOs. UNDO basically works by taking memory snapshots of the
whole VM ("saving UNDO") to revert to at a later point ("performing UNDO"),
so it is expensive on memory, and traditional VMs can only store a single
memory snapshot &mdash; making two UNDOs in a row, going back two steps,
impossible. Given this, <span class="extract"><span class="extract-syntax">undo_flag</span></span> has three possible states: 0 means
UNDO is not available at all, 1 means it is not available now because
there is no further saved state to go back to from here, and 2 means it
is available.
</li><li>(4) <span class="extract"><span class="extract-syntax">deadflag</span></span> in normally 0, or false, meaning play continues; 1 means the
game ended in death; 2 for ended in victory; higher numbers represent
exotic endings. (As from May 2010, the use of 2 for victory is deprecated,
and a separate flag, <span class="extract"><span class="extract-syntax">story_complete</span></span>, records whether the story is
"complete" in the sense that we don't expect the player to replay.)
<span class="extract"><span class="extract-syntax">deadflag</span></span> switching state normally triggers an end to rulebook processing,
so is the single most important global variable to the running of a story
file.
</li><li>(5) At present, <span class="extract"><span class="extract-syntax">time_rate</span></span> is not made use of in I7: if positive, it is
the number of minutes which pass each turn; if negative, the number of
turns which pass each minute. This is quite a neat way to approximate a
wide range of time steps with an integer such that fractions are exact
and we can approximate any duration to a fair accuracy (the worst case
being \(3/4\) minute, where we have to choose between 1 minute or \(1/2\)
minute).
</li><li>(6) Note that <span class="extract"><span class="extract-syntax">notify_mode</span></span> is irrelevant if the use option "Use no scoring"
is in force: it isn't looked at, and can't be changed, and shouldn't have
an effect anyway since <span class="extract"><span class="extract-syntax">score</span></span> will never be altered.
</li><li>(7) <span class="extract"><span class="extract-syntax">player</span></span> is a variable, not a constant, since the focus of play can
change. <span class="extract"><span class="extract-syntax">SACK_OBJECT</span></span> is likewise an unexpected variable: in the I6
library, there could only be one player's holdall, a single rucksack-like
possession which had to be the value of the constant <span class="extract"><span class="extract-syntax">SACK_OBJECT</span></span>. Here we
define <span class="extract"><span class="extract-syntax">SACK_OBJECT</span></span> as a global variable instead, the value of which is
the player's holdall currently in use. <span class="extract"><span class="extract-syntax">visibility_ceiling</span></span> is the
highest object in the tree visible from the player's point of view:
usually the room, but sometimes nothing (in darkness), and sometimes a
closed non-transparent container.
</li><li>(8) See "OrderOfPlay.i6t" for the meaning of action variables.
</li><li>(9) This is a slate of global variables used by the parser to give some
context to the general parsing routines (GPRs) which it calls; in the I6
design, any object can provide its own GPR, in the form of a <span class="extract"><span class="extract-syntax">parse_name</span></span>
property. GPRs are in effect parser plug-ins, and I7 makes extensive use
of them.
</li><li>(10) Similarly, variables for the parser to give context to another sort
of plug-in routine: a scope filter. I7 uses these too.
</li><li>(11) The <span class="extract"><span class="extract-syntax">move_*</span></span> variables are specific to the <span class="extract"><span class="extract-syntax">##Going</span></span> action.
</li><li>(12) These variables hold current settings for listing objects and,
more elaborately, performing room descriptions.
</li><li>(13) The current colour scheme is stored in variables in order that it can
be saved in the save game state, and changed correctly on an UNDO: if it
were a transient state inside the VM interpreter's screen model, then a
RESTORE or UNDO will upset what the original author may have intended the
appearance of text in particular scenes to be. (Cf. Adam Cadre's I6 patch
<span class="extract"><span class="extract-syntax">L61007</span></span>.)
</li><li>(14) These pixel dimensions are used both for the Glulx and v6 Z-machines,
but not for the more commonly used versions 5 or 8, whose screen model is
based on character cells.
</li></ul>
<pre class="displayed-code all-displayed-code code-font">
<span class="comment-syntax">(1)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">location</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="comment-syntax">does not = I7 "location": see below</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">sline1</span><span class="plain-syntax">; </span><span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">sline2</span><span class="plain-syntax">;</span>

<span class="comment-syntax">(2)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">undo_flag</span><span class="plain-syntax">;</span>

<span class="comment-syntax">(4)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">story_complete</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">resurrect_please</span><span class="plain-syntax"> = </span><span class="reserved-syntax">false</span><span class="plain-syntax">;</span>

<span class="comment-syntax">(5)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">not_yet_in_play</span><span class="plain-syntax"> = </span><span class="reserved-syntax">true</span><span class="plain-syntax">; </span><span class="comment-syntax">set false when first command received</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">turns</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "turn count"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">the_time</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "time of day"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">time_rate</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">NUMBER_SCENES_CREATED</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ICOUNT_SCENE</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">SCENE_ARRAY_SIZE</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">NUMBER_SCENES_CREATED</span><span class="plain-syntax">+2);</span>
<span class="reserved-syntax">Array</span><span class="plain-syntax"> </span><span class="identifier-syntax">scene_started</span><span class="plain-syntax"> --&gt; </span><span class="identifier-syntax">SCENE_ARRAY_SIZE</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Array</span><span class="plain-syntax"> </span><span class="identifier-syntax">scene_ended</span><span class="plain-syntax"> --&gt; </span><span class="identifier-syntax">SCENE_ARRAY_SIZE</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Array</span><span class="plain-syntax"> </span><span class="identifier-syntax">scene_status</span><span class="plain-syntax"> --&gt; </span><span class="identifier-syntax">SCENE_ARRAY_SIZE</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Array</span><span class="plain-syntax"> </span><span class="identifier-syntax">scene_endings</span><span class="plain-syntax"> --&gt; </span><span class="identifier-syntax">SCENE_ARRAY_SIZE</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Array</span><span class="plain-syntax"> </span><span class="identifier-syntax">scene_latest_ending</span><span class="plain-syntax"> --&gt; </span><span class="identifier-syntax">SCENE_ARRAY_SIZE</span><span class="plain-syntax">;</span>

<span class="comment-syntax">(6)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">score</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "score"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">last_score</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "last notified score"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">notify_mode</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="comment-syntax">score notification on or off</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">left_hand_status_line</span><span class="plain-syntax"> = </span><span class="identifier-syntax">T_SL_Location</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "left hand status line"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">right_hand_status_line</span><span class="plain-syntax"> = </span><span class="identifier-syntax">T_SL_Score_Moves</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "right hand status line"</span>

<span class="comment-syntax">(7)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">real_location</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "location"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">visibility_ceiling</span><span class="plain-syntax">; </span><span class="comment-syntax">highest object in tree visible to player</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">visibility_levels</span><span class="plain-syntax">; </span><span class="comment-syntax">distance in tree to that</span>

<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">SACK_OBJECT</span><span class="plain-syntax">; </span><span class="comment-syntax">current player's holdall item in use</span>

<span class="comment-syntax">(8)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">act_requester</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">actor</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "person asked" = I7 "person reaching"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">actors_location</span><span class="plain-syntax">; </span><span class="comment-syntax">like real_location, but for the actor</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">actor_location</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "actor-location"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax">; </span><span class="comment-syntax">action is out of world</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">inp1</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">inp2</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Array</span><span class="plain-syntax">  </span><span class="identifier-syntax">multiple_object</span><span class="plain-syntax"> --&gt; </span><span class="identifier-syntax">WorldModelKit</span><span class="plain-syntax">`</span><span class="identifier-syntax">MULTI_OBJ_LIST_SIZE_CFGV</span><span class="plain-syntax">; </span><span class="comment-syntax">multiple-object list (I6 table array)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">toomany_flag</span><span class="plain-syntax">; </span><span class="comment-syntax">multiple-object list overflowed</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">multiflag</span><span class="plain-syntax">; </span><span class="comment-syntax">multiple-object being processed</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">multiple_object_item</span><span class="plain-syntax">; </span><span class="comment-syntax">item currently being processed in multiple-object list</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">noun</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "noun"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">second</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "second noun"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">keep_silent</span><span class="plain-syntax">; </span><span class="comment-syntax">true if current action is being tried silently</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">trace_actions</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>

<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">untouchable_object</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">untouchable_silence</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">touch_persona</span><span class="plain-syntax">;</span>

<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">special_word</span><span class="plain-syntax">; </span><span class="comment-syntax">dictionary address of first word in "[text]" token</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">consult_from</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="comment-syntax">word number of start of "[text]" token</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">consult_words</span><span class="plain-syntax">; </span><span class="comment-syntax">number of words in "[text]" token</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax">; </span><span class="comment-syntax">value from any token not an object</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">special_number1</span><span class="plain-syntax">; </span><span class="comment-syntax">first value, if token not an object</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">special_number2</span><span class="plain-syntax">; </span><span class="comment-syntax">second value, if token not an object</span>

<span class="reserved-syntax">Array</span><span class="plain-syntax">  </span><span class="identifier-syntax">parser_results</span><span class="plain-syntax"> --&gt; </span><span class="constant-syntax">16</span><span class="plain-syntax">; </span><span class="comment-syntax">for parser to write its results in</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">parser_trace</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="comment-syntax">normally 0, but 1 to 5 traces parser workings</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">pronoun_word</span><span class="plain-syntax">; </span><span class="comment-syntax">records which pronoun ("it", "them", ...) caused an error</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">pronoun_obj</span><span class="plain-syntax">; </span><span class="comment-syntax">and what object it was thought to refer to</span>

<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">players_command</span><span class="plain-syntax"> = </span><span class="constant-syntax">100</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "player's command"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">matched_text</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "matched text"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">understand_as_mistake_number</span><span class="plain-syntax">; </span><span class="comment-syntax">which form of "Understand... as a mistake"</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">particular_possession</span><span class="plain-syntax">; </span><span class="comment-syntax">= I7 "particular possession"</span>

<span class="comment-syntax">(9)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">parser_action</span><span class="plain-syntax">; </span><span class="comment-syntax">written by the parser for the benefit of GPRs</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">parser_one</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">parser_two</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">parameters</span><span class="plain-syntax">; </span><span class="comment-syntax">number of I7 tokens parsed on the current line</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">action_reversed</span><span class="plain-syntax">; </span><span class="comment-syntax">(parameters would be reversed in order)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">wn</span><span class="plain-syntax">; </span><span class="comment-syntax">word number within "parse" buffer (from 1)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">num_words</span><span class="plain-syntax">; </span><span class="comment-syntax">number of words in buffer</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">verb_word</span><span class="plain-syntax">; </span><span class="comment-syntax">dictionary address of command verb</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">verb_wordnum</span><span class="plain-syntax">; </span><span class="comment-syntax">word number of command verb</span>

<span class="comment-syntax">(10)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">scope_reason</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PARSING_REASON</span><span class="plain-syntax">; </span><span class="comment-syntax">current reason for searching scope</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">scope_token</span><span class="plain-syntax">; </span><span class="comment-syntax">for "scope=Routine" grammar tokens</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">scope_error</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">scope_stage</span><span class="plain-syntax">; </span><span class="comment-syntax">1, 2 then 3</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">advance_warning</span><span class="plain-syntax">; </span><span class="comment-syntax">what a later-named thing will be</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">reason_code</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">; </span><span class="comment-syntax">for the I6 veneer</span>

<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">ats_flag</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="comment-syntax">for AddToScope routines</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">ats_hls</span><span class="plain-syntax">;</span>

<span class="comment-syntax">(11)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">move_pushing</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">move_from</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">move_to</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">move_by</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">move_through</span><span class="plain-syntax">;</span>

<span class="comment-syntax">(12)</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">lookmode</span><span class="plain-syntax"> = </span><span class="identifier-syntax">WorldModelKit</span><span class="plain-syntax">`</span><span class="identifier-syntax">ROOM_DESC_DETAIL_CFGV</span><span class="plain-syntax">; </span><span class="comment-syntax">1 = BRIEF, 2 = VERBOSE, 3 = SUPERBRIEF</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">c_style</span><span class="plain-syntax">; </span><span class="comment-syntax">current list-writer style</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">c_depth</span><span class="plain-syntax">; </span><span class="comment-syntax">current recursion depth</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">c_iterator</span><span class="plain-syntax">; </span><span class="comment-syntax">current iteration function</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">lt_value</span><span class="plain-syntax"> = </span><span class="identifier-syntax">EMPTY_TEXT_VALUE</span><span class="plain-syntax">; </span><span class="comment-syntax">common value of list_together</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">listing_together</span><span class="plain-syntax">; </span><span class="comment-syntax">object number of one member of a group being listed together</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">listing_size</span><span class="plain-syntax">; </span><span class="comment-syntax">size of such a group</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">c_margin</span><span class="plain-syntax">; </span><span class="comment-syntax">current level of indentation printed by WriteListFrom()</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">inventory_stage</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="comment-syntax">1 or 2 according to the context in which list_together uses</span>

<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">debug_scenes</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. Compass.</b>I6 identified compass directions as being children of the pseudo-object
<span class="extract"><span class="extract-syntax">Compass</span></span>, so we define it. (Note that <span class="extract"><span class="extract-syntax">Compass</span></span> is not a valid I7 object,
and is used for no other purpose.) Because of the traditional structure
of language definitions, this needs to come first.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">Object</span><span class="plain-syntax"> </span><span class="identifier-syntax">Compass</span><span class="plain-syntax"> </span><span class="string-syntax">"compass"</span><span class="plain-syntax"> </span><span class="reserved-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">concealed</span><span class="plain-syntax">;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. Score and Rankings Table.</b>The following command tells Inform to compile constant definitions for <span class="extract"><span class="extract-syntax">INITIAL_MAX_SCORE</span></span>
and/or <span class="extract"><span class="extract-syntax">RANKING_TABLE</span></span>, in cases where there are scores and rankings. If there's
no ranking table, <span class="extract"><span class="extract-syntax">RANKING_TABLE</span></span> is left undefined, so that we can <span class="extract"><span class="extract-syntax">#ifdef</span></span> this
possibility later.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">MAX_SCORE</span><span class="plain-syntax"> = </span><span class="identifier-syntax">INITIAL_MAX_SCORE</span><span class="plain-syntax">;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. Other odds and ends.</b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">ParserError</span><span class="plain-syntax"> </span><span class="identifier-syntax">error_type</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">error_type</span><span class="plain-syntax">) </span><span class="identifier-syntax">PrintSingleParagraph</span><span class="plain-syntax">(</span><span class="identifier-syntax">error_type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">rfalse</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">UnknownVerb</span><span class="plain-syntax"> </span><span class="identifier-syntax">v</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WorldModelKit</span><span class="plain-syntax">`</span><span class="identifier-syntax">NO_VERB_VERB_EXISTS</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">verb_wordnum</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="character-syntax">'no.verb'</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">rfalse</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">PrintVerb</span><span class="plain-syntax"> </span><span class="identifier-syntax">v</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WorldModelKit</span><span class="plain-syntax">`</span><span class="identifier-syntax">NO_VERB_VERB_EXISTS</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">v</span><span class="plain-syntax"> == </span><span class="character-syntax">'no.verb'</span><span class="plain-syntax">) { </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"do something to"</span><span class="plain-syntax">; </span><span class="reserved-syntax">rtrue</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">rfalse</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprevoff">&#10094;</li><li class="progresscurrent">mstm</li><li class="progresssection"><a href="sttm.html">sttm</a></li><li class="progresssection"><a href="lgtm.html">lgtm</a></li><li class="progresssection"><a href="lstm.html">lstm</a></li><li class="progresssection"><a href="ortm.html">ortm</a></li><li class="progresssection"><a href="actm.html">actm</a></li><li class="progresssection"><a href="fgtm.html">fgtm</a></li><li class="progresssection"><a href="ottm.html">ottm</a></li><li class="progresssection"><a href="prtm.html">prtm</a></li><li class="progresssection"><a href="wrtm.html">wrtm</a></li><li class="progresssection"><a href="mprtf.html">mprtf</a></li><li class="progresssection"><a href="tmtmp.html">tmtmp</a></li><li class="progresssection"><a href="tstm.html">tstm</a></li><li class="progresssection"><a href="chtm.html">chtm</a></li><li class="progresssection"><a href="strdc.html">strdc</a></li><li class="progressnext"><a href="sttm.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

